var app = angular.module("myApp", []);

app.controller("parentController", function($scope) {
	$scope.father = {
		name: 'laozhang ',
		age:  30,
		role: ' father'
	};
	console.log($scope.child);
	angular.element(document.getElementById("old-info")).text($scope.father.name + $scope.father.age + $scope.father.role);
});

app.controller("childController", function($scope) {
	$scope.child = {
		name: 'xiaozhang',
		age:  18,
		role: ' child'
	};

	$scope.say = function () {
		$scope.father.age     = 55;
		$scope.father.address = ' GD province';

		angular.element(document.getElementById("new-info")).text($scope.father.name + $scope.father.age + $scope.father.role);
	};
});

app.controller("brotherController", function($scope) {
	angular.element(document.getElementById("sibling")).text($scope.father.name);
});